package cn.ts.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import cn.ts.annotation.RateLimit;

@RestController
public class HelloController {
    @RateLimit(time = 3, count = 5, limitType = "redisRateLimiter")
    @GetMapping("/hello/{userId}")
    public String hello(@PathVariable("userId") String userId) {
        return "Hello, Spring Boot! User ID: " + userId;
    }
}